Carbon


IsMenuItemEnabled

Header: Menus.h Carbon status: Supported

Reports whether a given menu or menu item is enabled.

Boolean IsMenuItemEnabled (
    MenuHandle menu, 
    UInt16 item
);
menu

A handle to the menu containing the item to be examined.

item

The item number of the menu item. Pass 0 to specify the menu title and determine whether the menu as a whole is enabled.

function result

Returns true if the menu item is currently enabled; otherwise, false.

DISCUSSION

Your application can use the IsMenuItemEnabled function to determine whether specific menu items, even those with item numbers greater than 31, are currently enabled and can therefore be selected by the user.

The IsMenuItemEnabled function works for items enabled or disabled with either the Mac OS 8.5 Menu Manager functions EnableMenuItem and DisableMenuItem or with the pre–Mac OS 8.5 Menu Manager functions EnableItem and DisableItem.

VERSION NOTES

This function is available with Mac OS 8.5 and later.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when MenusLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by MenusLib 8.5 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)